<template>
	<!-- 分类导航 -->
	<uni-grid :column="5" :show-border="false" :highlight="true"  @change="handleChange">
		<uni-grid-item class="item" v-for="(item,index) in data" :key="index">
			<image :src="item.img" mode="widthFix" class="img"></image>
		</uni-grid-item>
	</uni-grid>
</template>
<script>
	export default {
		name: "v-grid-nav",
		props: {
			data: Array,
		},
		methods: {
			handleChange(e) {
			const {index}=e.detail
			this.$emit('click',this.data[index])	
			}
		}
	}
</script>

<style lang="scss" scoped>

		.item{

			.img{
				width: 100%;
			}
		}
</style>
